package com.usian.service.impl;

import com.github.pagehelper.PageInfo;
import com.usian.mapper.ProductMapper;
import com.usian.pojo.Product;
import com.usian.pojo.User;
import com.usian.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;

    @Override
    public void del(Integer id) {
        productMapper.deleteById(id);
    }

    @Override
    public List<Product> findAll(Product product) {
        return productMapper.findAll(product);
    }

    @Override
    public void add(Product product) {
        productMapper.insert(product);
    }

    @Override
    public void etid(Product product) {
        productMapper.updateById(product);
    }
}
